package com.qf.cm.controller;


import com.qf.cm.pojo.Project;
import com.qf.cm.service.ProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;


@Controller
@RequestMapping("project")
//@Log4j2
public class ProjectController {

    @Autowired
    private ProjectService projectService;
    @RequestMapping("findAll")
    public String findAll(Model model){
        List<Project> list = projectService.findAll();
        System.out.println("list:"+list);
        model.addAttribute("projects",list);

        return "project/list";
    }
}
